Skip to content

RealDictCursor doesn't work with named cursors #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
psycoteam opened this issue Aug 25, 2011 · 1 comment
Closed

RealDictCursor doesn't work with named cursors #67

psycoteam opened this issue Aug 25, 2011 · 1 comment

Comments

@psycoteam
Copy link

psycoteam commented Aug 25, 2011

Originally submitted by: justin.vanwinkle@gmail.com

IndexError                                Traceback (most recent call last)
/home/jvanwink/repos/milosolr/loader/<ipython-input-83-e90934fd1f1e> in <module>()
----> 1 res = ps.update_range(0, 100)

/home/jvanwink/repos/milosolr/loader/loader.py in update_range(self, min_id, max_id)
    229 
    230         while True:
--> 231             rows = cur.fetchmany(500)
    232             if not rows:
    233                 break

/usr/lib/python2.6/dist-packages/psycopg2/extras.py in fetchmany(self, size)
     76             self._build_index()
     77         if not self._prefetch:
---> 78             res = _cursor.fetchmany(self, size)
     79         return res
     80 

/usr/lib/python2.6/dist-packages/psycopg2/extras.py in **setitem**(self, name, value)
    246         if type(name) == int:
    247             print self._column_mapping
--> 248             name = self._column_mapping[name]
    249         return dict.__setitem__(self, name, value)
    250 

IndexError: list index out of range
@dvarrazzo
Copy link
Member

Fixed in my devel. To be released in 2.4.3.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants